package com.zhaopin.springboot.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author Administrator
 * @create 2021-04-19 17:45
 */
@Controller
public class IndexController {

    @RequestMapping(value = "/say")
    public ModelAndView say() {
        ModelAndView mv = new ModelAndView();
        mv.addObject("message", "hello my world");
        mv.setViewName("say");
        return mv;
    }

    @RequestMapping(value = "say1")
    public String say1(Model model){
        model.addAttribute("message","say1 second");
        return "say";
    }
}
